from tornado.web import RequestHandler

from core.decorators.open_handler import open_handler
from core.decorators.open_api.index import BaseRequestHandler,openApiFactory


@open_handler(path="/api/(.*)", index=1)
class openApiHandlerService(BaseRequestHandler):
    
    # 在这里复写父类的excute函数便可
    def execute(self,args,params,context):
        # 获取到相应的处理函数
        api_name = args[0]
        result = openApiFactory.execute_open_api(api_name,params)
        return result

    
